/******************************************************************************
  Module: ZWIN-API.TXT
          All commands for PPLZ in Dynamic Link Library for Windows
  Notices: Copyright (c) 2001-2013 ARGOX
******************************************************************************/
  Table of Contents:
==============================================================================
(01)Z_Bar2d_Maxi()              => Print Maxi code
(02)Z_Bar2d_PDF417()            => Print PDF-417
(03)Z_ClosePrn()                => Close printing task
(04)Z_CreatePrn()               => Create printing task
(05)Z_Set_FlashMemory()         => Select memory type to store form
(06)Z_Set_Format_New()          => Issue a new form name
(07)Z_Del_Format()              => Delete a form from RAM or Flash
(08)Z_Del_Graphic()             => Delete a graphic from RAM or Flash
(09)Z_Draw_Box()                => Draw a box
(10)Z_Draw_Line()               => Draw a line
(11)Z_Get_DLL_Version()         => Get library dll version
(12)Z_Get_DLL_VersionA()        => Get library dll version value
(13)Z_Get_Graphic_ColorBMP()    => To transform BMP graphic into monochrome PCX graphic
                                   and select memory type to store the graphic
(14)Z_Initial_Setting()         => Initial load-in string or file
(15)Z_Load_Graphic()            => Recall graphic to print
(16)Z_Open_ChineseFont()        => Designate a file of dot-matrix Chinese font for function "Z_Prn_Text_Chinese"
(17)Z_Print_Form()              => Print a form (with label sets and copies settings)
(18)Z_Print_Out()               => Send command file of designated functions to printer
(19)Z_Prn_Barcode()             => Print a barcode
(20)Z_Prn_Text()                => Print fonts using a resident font type
(21)Z_Prn_Text_Chinese()        => Print Chinese fonts using a designated dot-matrix Chinese font file
(22)Z_Prn_Text_TrueType()       => Print fonts using a true type font
(23)Z_Prn_Text_TrueType_W()     => Print fonts using a true type font with font height and width adjustable
(24)Z_Clear_Memory()            => Clear Data stored in RAM memory
(25)Z_Set_Backfeed()            => Set tear off position
(26)Z_Set_Darkness()            => Set printing darkness
(27)Z_Set_DebugDialog()         => Enable or disable debug environment
(28)Z_Set_Label()               => Set continuous label length (unit: dots)
(29)Z_Set_Mode()                => Set post-print action (tear off, peel off, cut)
(30)Z_Set_Origin()              => Set origin point of Y-Axis
(31)Z_Set_Paper()               => Printing with continuous media or non-continuous media
(32)Z_Set_Prncomport            => Set printer serial port
(33)Z_Set_Prncomport_PC()       => Set PC serial port
(34)Z_Set_Reset()               => Reset printer
(35)Z_Set_Speed()               => Set printing speed
(36)Z_Set_TPH()                 => Set printing in direct thermal or thermal transfer mode
(37)Z_Set_Unit()                => Set basic measure unit (inch, mm, or dot)
(38)Z_Set_Gap()                 => Set gap height (Only for media with gap > 0.5mm )
(39)Z_Set_ProcessDlg()          => Enable or disable printing task transmission process bar
(40)Z_Bar2d_QRCode()            => Print QR code
(41)Z_Set_PrintWidth()          => Set print width
(42)Z_Print_OutQuality          => Print the label
(43)Z_GetUSBBufferLen()         => Get USB port data length
(44)Z_EnumUSB()                 => Enum USB port
(45)Z_CreateUSBPort()           => Open USB port
(46)Z_CreatePort()              => Open port
(47)Z_Set_Mirror()              => Open or close reverse printing
(48)Z_Bar2d_RSS()               => Print RSS code
(49)Z_GetNetPrinterBufferLen()  => Get Net ptinter data length
(50)Z_EnumNetPrinter()          => Enum Net ptinter
(51)Z_CreateNetPort()           => Open Net port 
(52)Z_Prn_Text_TrueType_Uni()   => Create a "True Type Font" text object converted from Unicode string.  
(53)Z_Prn_Text_TrueType_UniB()  => Create a "True Type Font" text object converted from Unicode string.        
(54)Z_GetUSBDeviceInfo()        => Get USB port that device name and device path.
(55)Z_Get_Graphic_ColorBMPEx()  => To transform BMP graphic into monochrome PCX graphic
                                   and select memory type to store the graphic
(56)Z_Get_Graphic_ColorBMP_HBitmap() => To transform BMP graphic into monochrome PCX graphic
                                        and select memory type to store the graphic
(57)Z_WriteData()               => Used to immediately send data out, 
                                   or is temporarily written to the buffer.
(58)Z_ReadData()                => Get data from the printer.
(59)Z_Set_EncryptionKey()       => Set the encryption key.
(60)Z_Check_EncryptionKey()     => Check the encryption key correctness.
(61)Z_Set_ErrorDlg()            => Enable or disable retry inquiry dialog when transmitting fail.
(62)Z_Clear_MemoryEx()          => Clear data stored in printer RAM or Flash Memory.
(63)Z_Bar2d_DataMatrix()        => Print Data Matrix code
(64)Z_Set_CommTimeout()         => Set communication time.
(65)Z_Get_CommTimeout()         => Get communication time.
(66)Z_Set_LabelForSmartPrint()  => Set the information needed for Smart Print.

*******************************************************************************
1.Where should you put DLL file?
  If used 32-bit DLL files:
  A.Put DLL files in the same folder with application. (Strongly recommend.)
  B.In Windows 32-bit OS, you should put your DLL files into the \Windows\system32 directory.
  C.In Windows 64-bit OS, you should put your DLL files into the \Windows\SysWOW64 directory.
  If used 64-bit DLL files:
  A.Put DLL files in the same folder with application. (Strongly recommend.)
  B.In Windows 32-bit OS, 64-bit DLL files could not be used.
  C.In Windows 64-bit OS, you should put your DLL files into the \Windows\system32 directory.
2.Examples given below are for Visual C++ and Visual Basic and may not work 
  with other programming languages or environments.

*******************************************************************************
Z_GetUSBBufferLen()
Z_EnumUSB()
===============================================================================
PURPOSE  To retrieve the device name and data length of USB Printer.

SYNTAX
  VC:
    int Z_GetUSBBufferLen(void);
    int Z_EnumUSB(char *buf);
  VB: VBA:
    Declare Function Z_GetUSBBufferLen() As Long
    Declare Function Z_EnumUSB(ByVal buf As String) As Long
  VB.net:
    Declare Function Z_GetUSBBufferLen() As Integer
    Declare Function Z_EnumUSB(ByVal buf As Byte()) As Integer

PARAMETER
    buf;
      Stores USB Printer data.

RETURN
    Z_GetUSBBufferLen();  returns the length of USB Printer data.
    Z_EnumUSB();  0 -> OK.
    Reference ZW-Error.txt file.

EXAMPLE
  VC:
    char *pbuf;
    int nLen = Z_GetUSBBufferLen() + 1;
    if (nLen > 1) {
      pbuf = (char *)new char[nLen];
      Z_EnumUSB(pbuf);
    }
  VB: VBA:
    Dim nLen As Long
    Dim pbuf As String
    nLen = Z_GetUSBBufferLen() + 1
    If nLen > 1 Then
      pbuf = Space(128)
      Call Z_EnumUSB(pbuf)
    End If
  VB.net:
    Dim nLen As Integer
    Dim pbuf(128) As Byte
    nLen = Z_GetUSBBufferLen() + 1
    If nLen > 1 Then
      Call Z_EnumUSB(pbuf)
    End If

REMARK  These two functions are designed to be used together. First, use 
    Z_GetUSBBufferLen() to retrieve the data length of the USB port. Then, 
    allocate memory to Z_EnumUSB() to store the USB port data. 
    The data from USB port is split by ("0x0d0x0a"). For example, if the data is 
    A-200(0x0d)(0x0a)R-400ZIP, then USB1 is connected to A-200 and USB2 is 
    connected to R-400Zip.

*******************************************************************************
Z_GetUSBDeviceInfo()
===============================================================================
PURPOSE  To retrieve the device name and device path of USB Printer.

SYNTAX
  VC:
    int Z_GetUSBDeviceInfo(int nPort, char *pDeviceName, int *pDeviceNameLen, 
      char *pDevicePath, int *pDevicePathLen);
  VB: VBA:
    Declare Function Z_GetUSBDeviceInfo(ByVal nPort As Long, _
      ByVal pDeviceName As String, ByRef pDeviceNameLen As Long, _
      ByVal pDevicePath As String, ByRef pDevicePathLen As Long) As Long
  VB.net:
    Declare Function Z_GetUSBDeviceInfo(ByVal nPort As Integer, _
      ByVal pDeviceName As Byte(), ByRef pDeviceNameLen As Integer, _
      ByVal pDevicePath As Byte(), ByRef pDevicePathLen As Integer) As Integer

PARAMETERG
    nPort;
      Specifies the USB printer from which data is to be retrieved; begins with 1.
    pDeviceName;
      Name of USB printer device; if the input is a null pointer, no data will be written.
    pDeviceNameLen;
      When calling this function it is necessary to supply the length of 
      temporary storage of pDeviceName; when used as an output parameter it returns 
      the length of the device name.
    pDevicePath;
      Name of USB printer device; if the input is a null pointer, no data will be written.
    pDevicePathLen;
      When calling this function it is necessary to supply the length of 
      temporary storage of pDevicePath; when used as an output parameter it returns 
      the length of the device name.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example
  VC:
    char buf1[128]={0}, buf2[128]={0};
    int nLen1=128, nLen2=128, nlen;
    nlen = Z_GetUSBBufferLen() + 1;
    if (nlen > 1) {
      Z_GetUSBDeviceInfo(1, buf1, &nLen1, buf2, &nLen2);
      Z_CreatePrn(12, buf2); //or Z_CreatePort(6, 0, buf2);
    }
  VB: VBA:
    Dim buf1 As String
    Dim buf2 As String
    Dim nLen1, nLen2, nlen As Long

    nlen = Z_GetUSBBufferLen() + 1
    If nlen > 1 Then
      nLen1 = 128
      nLen2 = 128
      buf1 = Space(nLen1)
      buf2 = Space(nLen2)
      Call Z_GetUSBDeviceInfo(1, buf1, nLen1, buf2, nLen2)
      Call Z_CreatePrn(12, buf2) 'or Call Z_CreatePort(6, 0, buf2)
    End If
  VB.net:
    Dim buf1() As Byte
    Dim buf2() As Byte
    Dim nLen1, nLen2, nlen As Integer
    Dim encAscII = System.Text.Encoding.ASCII

    nlen = Z_GetUSBBufferLen() + 1
    If nlen > 1 Then
      nLen1 = 128
      nLen2 = 128
      ReDim buf1(nLen1)
      ReDim buf2(nLen2)
      Call Z_GetUSBDeviceInfo(1, buf1, nLen1, buf2, nLen2)
      Call Z_CreatePrn(12, encAscII.GetString(buf2, 0, nLen2))
      'or Call Z_CreatePort(6, 0, encAscII.GetString(buf2, 0, nLen2))
    End If

REMARK  This function first calls Z_GetUSBBufferLen() to obtain the data length 
    of the USB printer. Then Z_GetUSBDeviceInfo() is called to retrieve relevant 
    information about the USB printer.
    The data stored in pDevicePath is the path of the USB device and can be used 
    in Z_CreatePrn() and Z_CreatePort() to create the USB device.

*******************************************************************************
Z_GetNetPrinterBufferLen()
Z_EnumNetPrinter()
===============================================================================
PURPOSE  To retrieve the device name and length of Net Printer.

SYNTAX
  VC:
    int Z_GetNetPrinterBufferLen(void);
    int Z_EnumNetPrinter(char *buf);
  VB: VBA:
    Declare Function Z_GetNetPrinterBufferLen() As Long
    Declare Function Z_EnumNetPrinter(ByVal buf As String) As Long
  VB.net:
    Declare Function Z_GetNetPrinterBufferLen() As Integer
    Declare Function Z_EnumNetPrinter(ByVal buf As Byte()) As Integer

PARAMETER
    buf;
      Stores USB Printer data.

RETURN
    Z_GetNetPrinterBufferLen();  returns the length of USB data.
    Z_EnumNetPrinter();  0 -> OK.
    Reference ZW-Error.txt file.

Example
  VC:
    char *pbuf;
    int nLen = Z_GetNetPrinterBufferLen() + 1;
    if (nLen > 1) {
      pbuf = (char *)new char[nLen];
      Z_EnumNetPrinter(pbuf);
    }
  VB: VBA:
    Dim nLen As Long
    Dim pbuf As String
    nLen = Z_GetNetPrinterBufferLen() + 1
    If nLen > 1 Then
      pbuf = Space(128)
      Call Z_EnumNetPrinter(pbuf)
    End If
  VB.net:
    Dim nLen As Integer
    Dim pbuf(128) As Byte
    nLen = Z_GetNetPrinterBufferLen() + 1
    If nLen > 1 Then
      Call Z_EnumNetPrinter(pbuf)
    End If

REMARK  These two functions are designed to be used together. First, call 
    Z_GetNetPrinterBufferLen() to retrieve the data length of Net Printer. 
    Then, allocate memory to Z_EnumNetPrinter() to store Net Printer data.
    The data from Net Printer is split by ("0x0d0x0a"). For example, if the data is 
    NetPrinter:192.168.1.2(0x0d)(0x0a)NetPrinter:192.168.1.25, then 
    NetPrinter1 is connected to NetPrinter:192.168.1.2 and 
    NetPrinter2 is connected to NetPrinter:192.168.1.25.

*******************************************************************************
Z_CreatePrn()
===============================================================================
Function:  Create a printing task.

Syntax:
  VC:
    int Z_CreatePrn(int selection, LPCTSTR filename);
  VB: VBA:
    Declare Function Z_CreatePrn(ByVal selection As Long, _
      ByVal filename As String) As Long
  VB.net:
    Declare Function Z_CreatePrn(ByVal selection As Integer, _
      ByVal filename As String) As Integer

Parameters:
    selection;
      To select the printer port.
      0 -> print to file.
      1 -> lpt1, 2 -> lpt2, 3 -> lpt3
      4 -> com1, 5 -> com2, 6 -> com3
      10 -> pipe, 11 -> USBXXX, 12 -> USB
      13 -> LAN Client(TCP/IP)
    filename;
      When selection is 0, file name in current directory; full directory path.
      When selection is 10, output path or Regedit(Device path).
      When selection is 11, index of USB (count from 1).
      When selection is 12, Regedit(Device path) of USB.
      When selection is 13, IP address (TCP/IP port: 9100).
        Port can be modified by adding information to IP address.
        Ex: Set port as 80 -> 192.168.1.100:80)

RETURN 
    0 -> OK..
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_CreatePrn(1, NULL); or Z_CreatePrn(0, "C:\\out.prn");
    Z_CreatePrn(10,"\\\\allen\\Label");  //share mode.
  VB: VBA: VB.net:
    Call Z_CreatePrn(1, null) or Call Z_CreatePrn(0, "C:\\out.prn")
    Call Z_CreatePrn(10, "\\\\allen\\Label")

REMARK  The Z_CreatePrn() function will activate a valid printer port or 
    "print to file" path. This function must be performed before all commands.
    Z_CreatePrn(), Z_CreateUSBPort() , Z_CreateNetPort() and Z_CreatePort() 
    must use one of it at once.

*******************************************************************************
Z_CreatePort()
===============================================================================
Function:  Create a printing task.

Syntax:
  VC:
    int Z_CreatePort(int nPortType, int nPort, LPCTSTR filename);
  VB: VBA:
    Declare Function Z_CreatePort(ByVal nPortType As Long, ByVal nPort As Long, _
      ByVal filename As String) As Long
  VB.net:
    Declare Function Z_CreatePort(ByVal nPortType As Integer, ByVal nPort As Integer, _
      ByVal filename As String) As Integer
      
Parameters:
    nPortType;
      To select port type.
      0 -> file
      1 -> Serial port
      2 -> Parallel prot
      4 -> USB port
      5 -> LAN port
      6 -> USB port
    nPort;
      To select the printer port number.
      if nPortType is 1, 1 -> com1, 2 -> com2, ......
    filename;
      When nPortType is 0, path of file.
      When nPortType is 4, index of USB (count from 1).
      When nPortType is 5, IP address (TCP/IP port: 9100).
      When nPortType is 6, device path of USB.

RETURN 
    0 -> OK..
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_CreatePort(1, 1, NULL);
    Z_CreatePort(0, 0, "C:\\out.prn");
    Z_CreatePort(5, 0, "192.168.1.3");
  VB: VBA: VB.net:
    Call Z_CreatePort(1, 1, null)
    Z_CreatePort(0, 0, "C:\\out.prn");
    Z_CreatePort(5, 0, "192.168.1.3");

REMARK  This function must be positioned before all other functions.
    Z_CreatePrn(), Z_CreateUSBPort() , Z_CreateNetPort() and Z_CreatePort() 
    must use one of it at once.

*******************************************************************************
Z_CreateUSBPort()
Z_CreateNetPort()
===============================================================================
Function:  Create a printing task.
        Before using Z_CreateUSBPort(), to call Z_GetUSBBufferLen() first, 
        This is for with Z_EnumUSB() and Z_GetUSBDeviceInfo() synchronization.
        Before using Z_CreateNetPort(), to call Z_GetNetPrinterBufferLen() first, 
        This is for with Z_EnumNetPrinter() synchronization.

Syntax:
  VC:
    int Z_CreateUSBPort(int nPort);
    int Z_CreateNetPort(int nPort);
  VB: VBA:
    Declare Function Z_CreateUSBPort(ByVal nPort As Long) As Long
    Declare Function Z_CreateNetPort(ByVal nPort As Long) As Long
  VB.net:
    Declare Function Z_CreateUSBPort(ByVal nPort As Integer) As Integer
    Declare Function Z_CreateNetPort(ByVal nPort As Integer) As Integer

Parameters:
    nPort;
      USB and LAN port, the nPort count from 1.

RETURN 
    0 -> OK..
    Reference ZW-Error.txt file.

Example:
  VC:
    int nLen;
    nLen = Z_GetUSBBufferLen();
    if (nLen) {
      Z_CreateUSBPort(1);
    }
    nLen = Z_GetNetPrinterBufferLen();
    if (nLen) {
      Z_CreateNetPort(1);
    }
  VB: VBA: VB.net:
    Dim nLen As Long
    nLen = Z_GetUSBBufferLen()
    If nLen Then
      Call Z_CreateUSBPort(1)
    End If
    nLen = Z_GetNetPrinterBufferLen()
    If nLen Then
      Call Z_CreateNetPort(1)
    End If

REMARK  The Z_CreateUSBPort() and Z_CreateNetPort() function 
    will activate a valid printer port or "print to file" path. This 
    function must be performed before all commands.
    Z_CreatePrn(), Z_CreateUSBPort() , Z_CreateNetPort() and Z_CreatePort() 
    must use one of it at once.

*******************************************************************************
Z_ClosePrn()
===============================================================================
Function:  Close printing task.

Syntax:
  VC:
    void Z_ClosePrn(void);
  VB: VBA: VB.net:
    Declare Sub Z_ClosePrn()

Example:
  VC:
    Z_ClosePrn();
  VB: VBA: VB.net:
    Call Z_ClosePrn()

REMARK  The function Z_ClosePrn will release the memory being used, close
    the output port, or close the printing file you opened. This
    function must be located at the end of all functions.

*******************************************************************************
Z_Bar2d_Maxi()
===============================================================================
Function:  Print Maxi code.

Syntax:
  VC:
    int Z_Bar2d_Maxi(int x, int y, int nMode, int nSymbol, int nTotal, int nClass,
      int nCountry, char cZipCode1[6], char cZipCode2[4], LPCTSTR data, int increase);
  VB: VBA:
    Declare Function Z_Bar2d_Maxi(ByVal x As Long, ByVal y As Long, ByVal nMode As Long, _
      ByVal nSymbol As Long, ByVal nTotal As Long, ByVal nClass As Long, _
      ByVal nCountry As Long, ByVal cZipCode1 As String, ByVal cZipCode2 As String, _
      ByVal data As String, ByVal increase As Long) As Long
  VB.net:
    Declare Function Z_Bar2d_Maxi(ByVal x As Integer, ByVal y As Integer, _
      ByVal nMode As Integer, ByVal nSymbol As Integer, ByVal nTotal As Integer, _
      ByVal nClass As Integer, ByVal nCountry As Integer, ByVal cZipCode1 As String, _
      ByVal cZipCode2 As String, ByVal data As String, _
      ByVal increase As Integer) As Integer
            
Parameters:
    x;
      x-axis.
    y;
      y-axis.(1 dot = 0.125 mm)
    nMode;
      Barcode mode
      2: Numeric Postal Code(US)
      3: Alphanumeric Postal Code(Non-US)
    nSymbol;
      Symbol Number: 1 ~ 8.
    nTotal;
      Symbol Number Total: 1 ~ 8.
    nClass;
      three digit class of service.
    nCountry;
      three digit country code.
    cZipCode1;
      nMode = 2  -> five digit zip code.
      nMode = 3  ->  six character zip code.
    cZipCode2;
      four digit zip code externsion. Only used in nMode = 2.
    data;
      Data strings, max. 84 characters.
    increase;
      increment, default value = 0.

RETURN 
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Bar2d_Maxi(50, 50, 2, 1, 1, 001, 840, "15238", "2802", "This MaxiCode", 0);
  VB: VBA: VB.net:
    Call Z_Bar2d_Maxi(50, 50, 2, 1, 1, 001, 840, "15238", "2802", "This MaxiCode", 0)
    
REMARK  This function Z_Bar2d_Maxi will print a Maxi Code.

*******************************************************************************
Z_Bar2d_PDF417()
===============================================================================
Function:  Print a PDF-417 code.

Syntax:
  VC:
    int Z_Bar2d_PDF417(int x, int y, int o, int h, int s, int c, int r, int t, 
      int narrow, LPCTSTR data, int increase);
  VB: VBA:
    Declare Function Z_Bar2d_PDF417(ByVal x As Long, ByVal y As Long, ByVal o As Long, _
      ByVal h As Long, ByVal s As Long, ByVal c As Long, ByVal r As Long, _
      ByVal t As Long, ByVal narrow As Long, ByVal data As String, _
      ByVal increase As Long) As Long
  VB: VBA:
    Declare Function Z_Bar2d_PDF417(ByVal x As Integer, ByVal y As Integer, _
      ByVal o As Integer, ByVal h As Integer, ByVal s As Integer, ByVal c As Integer, _
      ByVal r As Integer, ByVal t As Integer, ByVal narrow As Integer, _
      ByVal data As String, ByVal increase As Integer) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis.(1 dot = 0.125 mm)
    o;
      printing orientation, 1=0X, 2=90X, 3=180X, 4=270X
    h;
      barcode height for individual rows
      h * module = height of individual rows
    s;
      error correction level (0~8)
    c;
      column count
    r;
      row count
    t;
      truncation flag, 0=normal; 1=truncated.
    narrow;
      module height
    data;
      data string, max. 84 characters.
    increase;
      increment, default=0.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Bar2d_PDF417(50, 50, 0, 5, 5, 2, 83, 0, 2, "PDF-417", 0);
  VB: VBA: VB.net:
    Call Z_Bar2d_PDF417(50, 50, 0, 5, 5, 2, 83, 0, 2, "PDF-417", 0)

REMARK  Above function will print a PDF-417 code.

*******************************************************************************
Z_Set_FlashMemory()
===============================================================================
Function:  Set memory type to store form.

Syntax:
  VC:
    int Z_Set_FlashMemory(int Status);
  VB: VBA:
    Declare Function Z_Set_FlashMemory(ByVal Status As Long) As Long
  VB.net:
    Declare Function Z_Set_FlashMemory(ByVal Status As Integer) As Integer

Parameters:
    Status;
      designate memory type for form storage.
      0 ->  RAM, 1 ->  Flash Memory.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_FlashMemory(0);
  VB: VBA: VB.net:
    Call Z_Set_FlashMemory(0)

REMARK  Use this function to designate the memory type to store form. The
    function must precede the form storing function.

*******************************************************************************
Z_Set_Format_New()
===============================================================================
Function:  Set form name.

Syntax:
  VC:
    void Z_Set_Format_New(LPCTSTR FormName);
  VB: VBA: VB.net:
    Declare Sub Z_Set_Format_New(ByVal FormatName As String)

Parameters:
    FormName;
      Form Name.

Example:
  VC:
    Z_Set_Format_New("demo");
  VB: VBA: VB.net:
    Call Z_Set_Format_New("demo")

REMARK  This function sets the form name. The form could be recalled to
    print after setting.

*******************************************************************************
Z_Del_Format()
===============================================================================
Function:  Delete a form.

Syntax:
  VC:
    int Z_Del_Format(int memory, char formname[11]);
  VB: VBA:
    Declare Function Z_Del_Format(ByVal nMem As Long, _
      ByVal formname As String) As Long
  VB.net:
    Declare Function Z_Del_Format(ByVal nMem As Integer, _
      ByVal formname As String) As Integer

Parameters:
    memory;
      designate memory which the form stored.
      0 -> RAM; 1 -> Flash.
    formname;
      Form name for delete. max. 10 characters.

Example:
  VC:
    Z_Del_Format(0, "demo");
  VB: VBA: VB.net:
    Call Z_Del_Format(0, "demo")

REMARK  The above function will delete a form named "demo".

*******************************************************************************
Z_Del_Graphic()
===============================================================================
Function:  Delete a graphic from RAM or Flash.

Syntax:
  VC:
    int Z_Del_Graphic(int memory, char graphicname[11]);
  VB: VBA:
    Declare Function Z_Del_Graphic(ByVal memory As Long, _
      ByVal graphicname As String) As Long
  VB.net:
    Declare Function Z_Del_Graphic(ByVal memory As Integer, _
      ByVal graphicname As String) As Integer

Parameters:
    memory;
      designate memory type to store a graphic.
      0 -> RAM; 1 -> Flash.
    graphicname;
      graphic name. max. 10 characters.

Example:
  VC:
    Z_Del_Graphic(0, "girl");
  VB: VBA: VB.net:
    Call Z_Del_Graphic(0, "girl")

REMARK  The above sample will delete a graphic named "girl" from RAM.

*******************************************************************************
Z_Draw_Box()
===============================================================================
Function:  Draw a box.

Syntax:
  VC:
    int Z_Draw_Box(int x, int y, int width, int height, int thickness);
  VB: VBA:
    Declare Function Z_Draw_Box(ByVal x As Long, ByVal y As Long, _
      ByVal width As Long, ByVal height As Long, ByVal thickness As Long) As Long
  VB.net:
    Declare Function Z_Draw_Box(ByVal x As Integer, ByVal y As Integer, _
      ByVal width As Integer, ByVal height As Integer, _
      ByVal thickness As Integer) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis.
    width;
      width of a box (0<width<9999).
    height;
      height of a box (0<height<9999).
    thickness;
      border thickness.

Example:
  VC:
    Z_Draw_Box(50, 100, 250, 100, 5);
  VB: VBA: VB.net:
    Call Z_Draw_Box(50, 100, 250, 100, 5)

REMARK  Above function will draw a box.

*******************************************************************************
Z_Draw_Line()
===============================================================================
Function:  Draw a line.

Syntax:
  VC:
    int Z_Draw_Line(int x, int y, int width, int height);
  VB: VBA:
    Declare Function Z_Draw_Line(ByVal x As Long, ByVal y As Long, _
      ByVal width As Long, ByVal height As Long) As Long
  VB.net:
    Declare Function Z_Draw_Line(ByVal x As Integer, ByVal y As Integer, _
      ByVal width As Integer, ByVal height As Integer) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis.
    width;
      line width (0<width<9999).
    height;
      line height (0<height<9999).

Example:
  VC:
    Z_Draw_Box(50, 100, 250, 3);
  VB: VBA: VB.net:
    Call Z_Draw_Box(50, 100, 250, 3)

REMARK  Above function will draw a line.

*******************************************************************************
Z_Get_DLL_Version()
Z_Get_DLL_VersionA()
===============================================================================
Function:  Retrieve or show library DLL version.

Syntax:
  VC:
    char* Z_Get_DLL_Version(int nShowMessage);
    int Z_Get_DLL_VersionA(int nShowMessage);
  VB: VBA:
    Declare Function Z_Get_DLL_Version(ByVal nShowMessage As Long) As Long
    Declare Function Z_Get_DLL_VersionA(ByVal nShowMessage As Long) As Long
  VB.net:
    Declare Function Z_Get_DLL_Version(ByVal nShowMessage As Integer) As String
    Declare Function Z_Get_DLL_VersionA(ByVal nShowMessage As Integer) As Integer

Parameters:
    nShowMessage;
      message window prompts function.
      0 -> disable; 1 -> enable.

RETURN
    Z_Get_DLL_Version();  return the string of present version, if failed then return NULL.
    Z_Get_DLL_VersionA();  return version value.
                           MainVersion = (return version value) / 100.
                           SubVersion = (return version value) % 100.

Example:
  VC:
    int nVersion, nMainVersion, nSubVersion;
    nVersion = Z_Get_DLL_VersionA(1);
    nMainVersion = nVersion / 100;
    nSubVersion = nVersion % 100;
  VB: VBA:
    Dim nVersion, nMainVersion, nSubVersion As Long
    nVersion = Z_Get_DLL_VersionA(1)
    nMainVersion = Int(nVersion / 100)
    nSubVersion = nVersion Mod 100
  VB.net:
    Dim nVersion, nMainVersion, nSubVersion As Integer
    nVersion = Z_Get_DLL_VersionA(1)
    nMainVersion = nVersion / 100
    nSubVersion = nVersion Mod 100

REMARK  Above function will prompt a message window and show present
    library DLL version.
    Because the Z_Get_DLL_Version() is return the string. 
    If using VB and VBA to develop, need to use RtlMoveMemory() to convert,
    there is technical difficulty to using RtlMoveMemory(). 
    If you use VB and VBA to develop propose not using this function, 
    please change to use Z_Get_DLL_VersionA().
    If you must use Z_Get_DLL_Version(), please reference MSDN. 
    
*******************************************************************************
Z_Get_Graphic_ColorBMP()
Z_Get_Graphic_ColorBMPEx()
Z_Get_Graphic_ColorBMP_HBitmap()
===============================================================================
Function:  To convert BMP image file to grayscale mode and store the graphics 
    in the printer's RAM or flash memory.

Syntax:
  VC:
    int Z_Get_Graphic_ColorBMP(int x, int y, int memory, LPCTSTR filename);
    int Z_Get_Graphic_ColorBMPEx(int x, int y, int nWidth, int nHeight,
      int rotate, int mem_mode, LPCTSTR id_name, LPCTSTR filename);
    int Z_Get_Graphic_ColorBMP_HBitmap(int x, int y, int nWidth, int nHeight,
      int rotate, int mem_mode, LPCTSTR id_name, HBITMAP hbm);
  VB: VBA:
    Declare Function Z_Get_Graphic_ColorBMP(ByVal x As Long, ByVal y As Long, _
      ByVal memory As Long, ByVal filename As String) As Long
    Declare Function Z_Get_Graphic_ColorBMPEx(ByVal x As Long, _
      ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, _
      ByVal rotate As Long, ByVal mem_mode As Long, ByVal id_name As String, _
      ByVal filename As String) As Long
    Declare Function Z_Get_Graphic_ColorBMP_HBitmap(ByVal x As Long, _
      ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, _
      ByVal rotate As Long, ByVal mem_mode As Long, ByVal id_name As String, _
      ByVal hbm As Long) As Long
  VB.net:
    Declare Function Z_Get_Graphic_ColorBMP(ByVal x As Integer, ByVal y As Integer, _
      ByVal memory As Integer, ByVal filename As String) As Integer
    Declare Function Z_Get_Graphic_ColorBMPEx(ByVal x As Integer, _
      ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, _
      ByVal rotate As Integer, ByVal mem_mode As Integer, ByVal id_name As String, _
      ByVal filename As String) As Integer
    Declare Function Z_Get_Graphic_ColorBMP_HBitmap(ByVal x As Integer, _
      ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, _
      ByVal rotate As Integer, ByVal mem_mode As Integer, ByVal id_name As String, _
      ByVal hbm As Integer) As Integer

Parameters:
    x;
      X-coordinate.
    y;
      Y-coordinate.
    nWidth;
      This parameter specifies the width of the scaled graphics; 
      0 indicates original width.
    nHeight;
      This parameter specifies the height of the scaled graphics; 
      0 indicates original height.
    rotate;
      This parameter specifies the degree of rotation of the scaled graphics; 
      '0' is 0X, '1' is 90X, '2' is 180X and '3' is 270X.
    memory;
      Storage location 0 -> RAM 1 -> Flash Memory.
      Note: Flash memory has a limited lifetime. It is recommended that data 
      be stored in RAM unless it will be reused.
    id_name;
      Provides a name to be stored in the printer for identification purposes; 
      can be call out graphic directly via the Z_Load_Graphic() function.
    filename;
      Name of graphics file; may contain file path.
      The format is as follows: XXXXXXXX.XXX or X:\\XXX\\XXX.XXX
    hbm;
      GDI HBITMAP Handle, which supports only the IMAGE_BITMAP format.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Get_Graphic_ColorBMP(30, 20, 0, "bb.bmp");
    Z_Get_Graphic_ColorBMPEx(30, 20, 200, 150, 2, 1, "bb1", "bb.bmp");//180 angle.
    HANDLE himage = LoadImage(NULL,"bb.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
    Z_Get_Graphic_ColorBMP_HBitmap(30, 20, 250, 80, 1, 1, "bb2", (HBITMAP)himage);//90 angle.
  VB: VBA:
    Const IMAGE_BITMAP = 0
    Const LR_LOADFROMFILE = &H10
    Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, _
            ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, _
            ByVal un2 As Long) As Long
    Private Declare Function DeleteObject Lib "Gdi32" (ByVal ho As Long) As Long

    Call Z_Get_Graphic_ColorBMP(30, 20, 0, "bb.bmp")
    Call Z_Get_Graphic_ColorBMPEx(30, 20, 200, 150, 2, 1, "bb1", "bb.bmp") ' 180 angle.
    Dim himage As Long
    himage = LoadImage(0, "bb.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE)
    Call Z_Get_Graphic_ColorBMP_HBitmap(30, 20, 250, 80, 1, 1, "bb2", himage) ' 90 angle.
    If himage Then
        Call DeleteObject(himage)
    End If
  VB.net:
    Const IMAGE_BITMAP = 0
    Const LR_LOADFROMFILE = &H10
    Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Integer, _
            ByVal lpsz As String, ByVal un1 As Integer, ByVal n1 As Integer, ByVal n2 As Integer, _
            ByVal un2 As Integer) As Integer

    Call Z_Get_Graphic_ColorBMP(30, 20, 0, "bb.bmp")
    Call Z_Get_Graphic_ColorBMPEx(30, 20, 200, 150, 2, 1, "bb1", "bb.bmp") ' 180 angle.
    Dim himage As Integer
    himage = LoadImage(0, "bb.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE)
    Call Z_Get_Graphic_ColorBMP_HBitmap(30, 20, 250, 80, 1, 1, "bb2", himage) ' 90 angle.

REMARK  You may provide a color BMP image file of any bit map to the 
    Z_Get_Graphic_ColorBMP() function; it will automatically be converted to 
    a B&W grayscale image and sent to the printer for output.
    The Z_Get_Graphic_ColorBMPEx() and Z_Get_Graphic_ColorBMP_HBitmap() functions 
    can be used to carry out zoom in, zoom out and rotation functions. They take 
    file names and GDI HBITMAP Handles as data sources.
    
*******************************************************************************
Z_Initial_Setting()
===============================================================================
Function:  Initial load-in strings or file.

Syntax:
  VC:
    int Z_Initial_Setting(int mode, LPCTSTR Source);
  VB: VBA:
    Declare Function Z_Initial_Setting(ByVal mode As Long, _
      ByVal Source As String) As Long
  VB.net:
    Declare Function Z_Initial_Setting(ByVal mode As Integer, _
      ByVal Source As String) As Integer

Parameters:
    mode:
      select the input type.
      0 -> input strings.
      1 -> input file.
    Source:
      data source, could be strings or file name.(or including path)

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    LPCTST aa = "^FO120,30\r\n";
    Z_Initial_Setting(0, aa);
      or
    Z_Initial_Setting(1, "initfile.txt");
  VB: VBA: VB.net:
    Dim aa As String
    aa = "^FO120,30" + Chr(13) + Chr(10)
    Call Z_Initial_Setting(0, aa)
      or
    Call Z_Initial_Setting(1, "initfile.txt")

REMARK  This function will send a command strings or file to printer. The
    function must be positioned after function Z_Creat_Prn() but
    precede other functions to be used as customized settings.

*******************************************************************************
Z_WriteData()
===============================================================================
PURPOSE   To output data immediately or send it to temporary area.

SYNTAX
  VC:
    int Z_WriteData(int IsImmediate, LPCTSTR pbuf, DWORD length);
  VB: VBA:
    Declare Function Z_WriteData(ByVal IsImmediate As Long, _
      ByVal pbuf As String, ByVal length As Long) As Long  
  VB.net:
    Declare Function Z_WriteData(ByVal IsImmediate As Integer, _
      ByVal pbuf As Byte(), ByVal length As ULong) As Integer

PARAMETER
    IsImmediate;
      1 that the data should be sent immediately, and only the data in pbuf 
      should be sent to the output port; 
      0 that the data is to be stored to the temporary area and will only be 
      sent when Z_Print_Out() is called.
    pbuf;
      The data pointer to be sent.
    length;
      Length of pbuf data.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

EXAMPLE
  VC:
    const char sznop1[] = "nop_front\r\n";
    const char sznop2[] = "nop_middle\r\n";
    Z_WriteData(0, sznop2, (DWORD)strlen(sznop2));
    Z_WriteData(1, sznop1, (DWORD)strlen(sznop1));
  VB: VBA:
    Dim sznop1 As String = "nop_front" + vbCrLf
    Dim sznop2 As String = "nop_middle" + vbCrLf
    Call Z_WriteData(0, sznop2, Len(sznop2))
    Call Z_WriteData(1, sznop1, Len(sznop1))  
  VB.net:
    Dim encAscII = System.Text.Encoding.ASCII
    Dim sznop1 As String = "nop_front" + vbCrLf
    Dim sznop2 As String = "nop_middle" + vbCrLf
    Call Z_WriteData(0, encAscII.GetBytes(sznop2), sznop2.Length)
    Call Z_WriteData(1, encAscII.GetBytes(sznop1), sznop1.Length)

REMARK  Any controls, commands or data that you wish to send to the printer can 
    be sent via this function.

*******************************************************************************
Z_ReadData()
===============================================================================
PURPOSE   To retrieve data from the printer.

SYNTAX
  VC:
    int Z_ReadData(LPTSTR pbuf, DWORD length, DWORD dwTimeoutms);
  VB: VBA:
    Declare Function Z_ReadData(ByVal pbuf As String, ByVal length As Long, _
      ByVal dwTimeoutms As Long) As Long
  VB.net:
    Declare Function Z_ReadData(ByVal pbuf As Byte(), ByVal length As ULong, _
      ByVal dwTimeoutms As ULong) As Integer

PARAMETER
    pbuf;
      Contains the pointer to the returned data. If it is a null pointer, 
      no data is written.
    length;
      Size of data to be read.
    dwTimeoutms;
      Time counter, i.e. maximum length of time allowed when reading data (unit: ms).

RETURN
    Size of data to be read.

EXAMPLE
  VC:
    int ret;
    char temp[100]={0};
    Z_WriteData(1, "~HS\r\n", 5);//~HS
    ret = Z_ReadData(temp, 82, 1000);//1 second.
  VB: VBA:
    Dim ret As Integer
    Dim temp As String
    temp = Space(100)
    temp = "~HS\r\n"
    Z_WriteData(1, temp, 5)   '~HS
    ret = Z_ReadData(pbuf, 82, 1000)   '1 second.
  VB.net:
    Dim ret As Integer
    Dim temp(100) As Byte
    Z_WriteData(1, encAscII.GetBytes("~HS\r\n"), 5)   '~HS
    ret = Z_ReadData(pbuf, 82, 1000)   '1 second.

REMARK  This function is used to read the data returned from the printer, so 
    please check to see if the communication port being used has the ability to 
    return data. Use this function in conjunction with the Z_WriteData() function 
    and refer to the Argox programmer's manual for additional information.

*******************************************************************************
Z_Load_Graphic()
===============================================================================
Function:  Recall and print a graphic.

Syntax:
  VC:
    int Z_Load_Graphic(int x, int y, int memory, char graphicname[11], int hori, 
      int vert);
  VB: VBA:
    Declare Function Z_Load_Graphic(ByVal x As Long, ByVal y As Long, _
      ByVal memory As Long, ByVal graphicname As String, ByVal hori As Long, _
      ByVal vert As Long) As Long
  VB.net:
    Declare Function Z_Load_Graphic(ByVal x As Integer, ByVal y As Integer, _
      ByVal memory As Integer, ByVal graphicname As String, ByVal hori As Integer, _
      ByVal vert As Integer) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis.(1 dot = 0.125 mm)
    memory;
      designate memory type to store graphics. 0 -> RAM; 1 -> Flash Memory.
      REMARK The flash writing lifespan is limited, unless for special applications 
      that require store in Flash memory then recall in another procedure,
      for general printing, it's strongly recommended that all graphics being 
      download into RAM.
    graphicname;
      name of stored image(exclude file name extension), 
      up to 10 alphanumeric characters.
    hori;
      magnification on the x-axis.
      (1 <= hori, vert <= 10, default = 1)
    vert;
      magnification on the y-axis.
      (1 <= hori, vert <= 10, default = 1)

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Load_Graphic(50, 30, 0, "phone", 1, 1);
  VB: VBA: VB.net:
    Call Z_Load_Graphic(50, 30, 0, "phone", 1, 1)

REMARK  Above function will print a graphic, but Z_Get_Graphic function should be 
    preceded executed to recall the graphic stored in RAM or Flash Meomory.

*******************************************************************************
Z_Open_ChineseFont()
===============================================================================
Function:  Designate a file of dot-matrix Chinese font.

Syntax:
  VC:
    int Z_Open_ChineseFont(char* path);
  VB: VBA:
    Declare Function Z_Open_ChineseFont(ByVal path As String) As Long
  VB.net:
    Declare Function Z_Open_ChineseFont(ByVal path As String) As Integer

Parameters:
    path;
      Path where the dot-matrix Chinese font file locates.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Open_ChineseFont("C:\\ET3");
  VB: VBA: VB.net:
    Call Z_Open_ChineseFont("C:\\ET3")

REMARK  Function will open a dot-matrix Chinese font file (16*15 and 24*24)
    for usage of function Z_Prn_Text_Chinese.

*******************************************************************************
Z_Print_Form()
===============================================================================
Function:  Print a form (with label sets and counter settings).

Syntax:
  VC:
    int Z_Print_Form(int labelset, int copies, int mem, char formout[11]);
  VB: VBA:
    Declare Function Z_Print_Form(ByVal labset As Long, ByVal copies As Long, _
      ByVal mem As Long, ByVal formout As String) As Long
  VB.net:
    Declare Function Z_Print_Form(ByVal labset As Integer, ByVal copies As Integer, _
      ByVal mem As Integer, ByVal formout As String) As Integer

Parameters:
    labset;
      total quantity of labels to print(range: 1~32767)
    copies;
      replicates of each serial number (1~32767)
    mem;
      assign the memory which form stored.
      0 -> RAM, 1 -> Flash.
    formout;
      form name that is previously loaded or stored in printer.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Print_Form(3, 2, 0, "demo");
  VB: VBA: VB.net:
    Call Z_Print_Form(3, 2, 0, "demo");

REMARK  The function will perform the print task and send a form to printer. Before 
    use of this function, Z_Set_Format_New() must be prior executed, and Z_Print_Form() 
    should be positioned before Z_ClosePrn, but after all other functions. 
    When use this function, function Z_Print_Out() will not be required.

*******************************************************************************
Z_Print_Out()
===============================================================================
Function:  perform the printing task.
PS:Please using Z_Print_OutQuality() function.

Syntax:
  VC:
    int Z_Print_Out(int sets, int copies);
  VB: VBA:
    Declare Function Z_Print_Out(ByVal sets As Long, ByVal copies As Long) As Long
  VB.net:
    Declare Function Z_Print_Out(ByVal sets As Integer, ByVal copies As Integer) As Integer

Parameter:
    sets;
      pause and cut value(labels between pauses).
    copies;
      replicates of each serial number.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Print_Out(1, 1);
  VB: VBA: VB.net:
    Call Z_Print_Out(1, 1)

REMARK  This function will perform the print task, all designated functions
    and parameters will be transferred to PPLZ printer commands and
    sent to printer. Please position this function before function Z_ClosePrn().

*******************************************************************************
Z_Prn_Barcode()
===============================================================================
Function:  print a barcode (with counter function).

Syntax:
  VC:
    Z_Prn_Barcode(int x, int y, int ori, int narrow, int width, int height, char bar_type, 
      int increase, LPCTSTR data, char p1, char p2, char p3, char p4, char p5);
  VB: VBA:
    Declare Function Z_Prn_Barcode(ByVal x As Long, ByVal y As Long, ByVal ori As Long, _
      ByVal narrow As Long, ByVal width As Long, ByVal height As Long, _
      ByVal bar_type As Byte, ByVal increase As Long, ByVal data As String, _
      ByVal p1 As Byte, ByVal p2 As Byte, ByVal p3 As Byte, ByVal p4 As Byte, _
      ByVal p5 As Byte) As Long
  VB.net:
    Declare Function Z_Prn_Barcode(ByVal x As Integer, ByVal y As Integer, _
      ByVal ori As Integer, ByVal narrow As Integer, ByVal width As Integer, _
      ByVal height As Integer, ByVal bar_type As Byte, ByVal increase As Integer, _
      ByVal data As String, ByVal p1 As Byte, ByVal p2 As Byte, ByVal p3 As Byte, _
      ByVal p4 As Byte, ByVal p5 As Byte) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis. (1dot = 0.125mm)
    ori;
      orientation, 1=0X, 2=90X, 3=180X, 4=270X
    narrow;
      narrow bar width.
    width;
      wide bar width.
    height;
      bar code heigth.
    bar_type;
      bar code type (refer to below table -> Type).
    increase;
      increment of counter.
    data;
      barcode data.
    p1,p2,p3,p4,p5;
      The different Barcode have different meaning.
      +------+--------------------+------------------------------------------------------------+
      | Type |    Barcode type    |                   Details (char p1~p5)                     |
      +------+--------------------+------------------------------------------------------------+
      |  1   | Code 11            | p1: print check digit (Y: 1 digit, N: 2 digits)            |
      |      |                    | p2: print interpretation line (Y or N)                     |
      |      |                    | p3: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  2   | Interleaved 2 of 5 | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      |      |                    | p3: print check sum (Y or N)                               |
      +------+--------------------+------------------------------------------------------------+
      |  3   | Code 39            | p1: print check digit (Y or N)                             |
      |      |                    | p2: print interpretation line (Y or N)                     |
      |      |                    | p3: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  8   | EAN-8              | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  9   | UPC-E              | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      |      |                    | p3: print check digit (Y or N)                             |
      +------+--------------------+------------------------------------------------------------+
      |  A   | Code 93            | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      |      |                    | p3: print check digit (Y or N)                             |
      +------+--------------------+------------------------------------------------------------+
      |  C   | Code 128           | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      |      |                    | p3: UCC check digit (Y or N)                               |
      |      |                    | p4: mode (N: Code 128, U: Code 128 UCC)                    |
      +------+--------------------+------------------------------------------------------------+
      |  E   | EAN-13             | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  I   | Industrial 2 of 5  | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  J   | Standard 2 of 5    | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  K   | ANSI Codabar       | p1: print check digit (Y or N)                             |
      |      |                    | p2: print interpretation line (Y or N)                     |
      |      |                    | p3: print interpretation line above code (Y or N)          |
      |      |                    | p4: designate start character (accepted value: A, B, C, D) |
      |      |                    | p5: designate stop character (accepted value: A, B, C, D   |
      +------+--------------------+------------------------------------------------------------+
      |  L   | LOGMARS            | p1: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  M   | MSI Code           | p1: check digit selection                                  |
      |      |                    |     A: no check digits                                     |
      |      |                    |     B: 1 Mod 10                                            |
      |      |                    |     C: 2 Mod 10                                            |
      |      |                    |     D: 1 Mod 10 and 1 Mod 11                               |
      |      |                    | p2: print interpretation line (Y or N)                     |
      |      |                    | p3: print interpretation line above code (Y or N)          |
      |      |                    | p4: print check digit (Y or N)                             |
      +------+--------------------+------------------------------------------------------------+
      |  P   | Plessey            | p1: print check digit (Y: 1 digit, N: 2 digits)            |
      |      |                    | p2: print interpretation line (Y or N)                     |
      |      |                    | p3: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  S   | UPC/EAN Extensions | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      |  U   | UPC-A              | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      |      |                    | p3: print check digit (Y or N)                             |
      +------+--------------------+------------------------------------------------------------+
      |  Z   | POSTNET            | p1: print interpretation line (Y or N)                     |
      |      |                    | p2: print interpretation line above code (Y or N)          |
      +------+--------------------+------------------------------------------------------------+
      REMARK if a parameter is not used, any value could be inputted.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Prn_Barcode(650, 15, 1, 2, 2, 51, 'C', 0, "1234567", 'Y', 'N', 'N', 'N', 'N');
  VB: VBA: VB.net:
    Call Z_Prn_Barcode(650, 15, 1, 2, 2, 51, Asc("C"), 0, "1234567", Asc("Y"), _
      Asc("N"), Asc("N"), Asc("N"), Asc("N"))

REMARK  Above function will print a barcode.

*******************************************************************************
Z_Prn_Text()
===============================================================================
Function:  print text with built-in fonts (with counter function).

Syntax:
  VC:
    int Z_Prn_Text(int x, int y, int ori, char font, int height, int width, 
      int increase, LPCTSTR data);
  VB: VBA:
    Declare Function Z_Prn_Text(ByVal x As Long, ByVal y As Long, ByVal ori As Long, _
      ByVal font As Byte, ByVal height As Long, ByVal width As Long, _
      ByVal numeric As Long, ByVal data As String) As Long
  VB.net:
    Declare Function Z_Prn_Text(ByVal x As Integer, ByVal y As Integer, _
      ByVal ori As Integer, ByVal font As Byte, ByVal height As Integer, _
      ByVal width As Integer, ByVal numeric As Integer, ByVal data As String) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis. (1 dot = 0.125mm)
    ori;
      orientation, 1=0X, 2=90X, 3=180X, 4=270X
    font;
      Built-in font type selection(A~H: bitmapped fonts; 0, P~V:
      scalable fonts/smooth vector fonts)
      Bitmapped Font Size:
      
      xFontx  H * W x
      
      x A  x  9 *  5x
      uwwwwqwwwwwwwwt
      x B  x 11 *  7x
      uwwwwqwwwwwwwwt
      xC,D x 18 * 10x
      uwwwwqwwwwwwwwt
      x E  x 28 * 15x
      uwwwwqwwwwwwwwt
      x F  x 26 * 13x
      uwwwwqwwwwwwwwt
      x G  x 60 * 40x
      uwwwwqwwwwwwwwt
      x H  x 21 * 13x
      |wwwwrwwwwwwww}
    height;
      magnification of height (##)
    width;
      magnification of width (##)
      ## Bitmapped fonts (A~H): Multiple of height/width from 2
      to 10 times the standard height / width in increments of 1.
      ## Scalable fonts (0, P~V): 10~1500 dots.
    increase;
      increment of counter.
    data;
      text data.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Prn_Text(50, 110, 1, 'A', 90, 10, 0, "A123456");
  VB: VBA: VB.net:
    Call Z_Prn_Text(50, 110, 1, Asc("A"), 90, 10, 0, "A123456")

REMARK  Above function will print a build-in fonts.

*******************************************************************************
Z_Prn_Text_Chinese()
===============================================================================
Function:  print a text with dot-matrix Chinese font(16*15 or 24*24).

Syntax:
  VC:
    int Z_Prn_Text_Chinese(int x, int y, int fonttype, LPCTSTR id_name, LPCTSTR data, 
      int mem);
  VB: VBA:
    Declare Function Z_Prn_Text_Chinese(ByVal x As Long, ByVal y As Long, _
      ByVal fonttype As Long, ByVal id_name As String, ByVal data As String, _
      ByVal mem As Long) As Long
  VB.net:
    Declare Function Z_Prn_Text_Chinese(ByVal x As Integer, ByVal y As Integer, _
      ByVal fonttype As Integer, ByVal id_name As String, ByVal data As String, _
      ByVal mem As Integer) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis.
    fonttype;
      font type of dot-matrix Chinese font. 
      0 -> 16*15, 1 -> 24*24.
    id_name;
      assign a font ID to the font type to store in printer,
      then use function Z_Load_Graphic() to recall the font.
    data;
      text data.
    mem;
      memory device to store the font. 0 -> RAM, 1 ->  Flash memory.
      REMARK The flash writing lifespan is limited, unless for special applications 
      that require store in Flash memory then recall in another procedure,
      for general printing, it's strongly recommended that all graphics being 
      download into RAM.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Open_ChineseFont("C:\\ET3");
    Z_Prn_Text_Chinese(100, 100, 0, "A01", "aQqeϢѢҢ", 0);
  VB: VBA: VB.net:
    Call Z_Open_ChineseFont("C:\\ET3")
    Call Z_Prn_Text_Chinese(100, 100, 0, "A01", "aQqeϢѢҢ", 0)

REMARK  The Z_Prn_Text_Chinese function is able to print a text for Chinese
    dot font file (16*15 or 24*24).

*******************************************************************************
Z_Prn_Text_TrueType()
Z_Prn_Text_TrueType_W()
Z_Prn_Text_TrueType_Uni()
Z_Prn_Text_TrueType_UniB()
===============================================================================
Function:  To print a line of text in TrueType font.

Syntax:
  VC:
    int Z_Prn_Text_TrueType(int x, int y, int FSize, LPCTSTR FType, int Fspin,
      int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name,
      LPCTSTR data, int mem_mode);
    int Z_Prn_Text_TrueType_W(int x, int y, int FHeight, int FWidth, LPCTSTR FType, 
      int Fspin, int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name, 
      LPCTSTR data, int mem_mode);
    int Z_Prn_Text_TrueType_Uni(int x, int y, int FSize, LPCTSTR FType, int Fspin, 
      int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name, 
      LPCWSTR data, int format, int mem_mode);
    int Z_Prn_Text_TrueType_UniB(int x, int y, int FSize, LPCTSTR FType, int Fspin, 
      int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name, 
      LPCTSTR data, int format, int mem_mode);
  VB: VBA:
    Declare Function Z_Prn_Text_TrueType(ByVal x As Long, ByVal y As Long, _
      ByVal FSize As Long, ByVal FType As String, ByVal Fspin As Long, _
      ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, _
      ByVal FStrikeOut As Long, ByVal id_name As String, ByVal data As String, _
      ByVal mem As Long) As Long
    Declare Function Z_Prn_Text_TrueType_W(ByVal x As Long, ByVal y As Long, _
      ByVal FHeight As Long, ByVal FWidth As Long, ByVal FType As String, _
      ByVal Fspin As Long, ByVal FWeight As Long, ByVal FItalic As Long, _
      ByVal FUnline As Long, ByVal FStrikeOut As Long, ByVal id_name As String, _
      ByVal data As String, ByVal mem As Long) As Long
    Declare Function Z_Prn_Text_TrueType_Uni(ByVal x As Long, ByVal y As Long, _
      ByVal FSize As Long, ByVal FType As String, ByVal Fspin As Long, _
      ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, _
      ByVal FStrikeOut As Long, ByVal id_name As String, ByRef data As Byte, _
      ByVal format As Long, ByVal mem_mode As Long) As Long
    Declare Function Z_Prn_Text_TrueType_UniB(ByVal x As Long, ByVal y As Long, _
      ByVal FSize As Long, ByVal FType As String, ByVal Fspin As Long, _
      ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, _
      ByVal FStrikeOut As Long, ByVal id_name As String, ByRef data As Byte, _
      ByVal format As Long, ByVal mem_mode As Long) As Long
  VB.net:
    Declare Function Z_Prn_Text_TrueType(ByVal x As Integer, ByVal y As Integer, _
      ByVal FSize As Integer, ByVal FType As String, ByVal Fspin As Integer, _
      ByVal FWeight As Integer, ByVal FItalic As Integer, ByVal FUnline As Integer, _
      ByVal FStrikeOut As Integer, ByVal id_name As String, ByVal data As String, _
      ByVal mem As Integer) As Integer
    Declare Function Z_Prn_Text_TrueType_W(ByVal x As Integer, ByVal y As Integer, _
      ByVal FHeight As Integer, ByVal FWidth As Integer, ByVal FType As String, _
      ByVal Fspin As Integer, ByVal FWeight As Integer, ByVal FItalic As Integer, _
      ByVal FUnline As Integer, ByVal FStrikeOut As Integer, ByVal id_name As String, _
      ByVal data As String, ByVal mem As Integer) As Integer
    Declare Function Z_Prn_Text_TrueType_Uni(ByVal x As Integer, ByVal y As Integer, _
      ByVal FSize As Integer, ByVal FType As String, ByVal Fspin As Integer, _
      ByVal FWeight As Integer, ByVal FItalic As Integer, ByVal FUnline As Integer, _
      ByVal FStrikeOut As Integer, ByVal id_name As String, ByVal data As Byte(), _
      ByVal format As Integer, ByVal mem_mode As Integer) As Integer
    Declare Function Z_Prn_Text_TrueType_UniB(ByVal x As Integer, ByVal y As Integer, _
      ByVal FSize As Integer, ByVal FType As String, ByVal Fspin As Integer, _
      ByVal FWeight As Integer, ByVal FItalic As Integer, ByVal FUnline As Integer, _
      ByVal FStrikeOut As Integer, ByVal id_name As String, ByVal data As Byte(), _
      ByVal format As Integer, ByVal mem_mode As Integer) As Integer

Parameters:
    x;
      X-coordinate; unit: pixel.
    y;
      Y-coordinate; unit: pixel.
    FSize;
      TrueType font size; unit: dot.
    FHeight;
      Font height (unit: dot).
    FWidth;
      FFont height; unit: dot.
      FSize/FHeight/FWidth = (dpi * point) / 72.
    FType;
      Name of TrueType font.
    Fspin;
      TrueType font rotation. 1 -> 0, 2 -> 90, 3 -> 180, 4 -> 270
    FWeight;
      TrueType font thickness.
      0 and NULL is and 400 -> 400 Standard,
      100 -> extra fine,  200 -> very fine,
      300 -> fine,        500 -> normal,
      600 -> half bold,   700 -> bold,
      800 -> extra bold,  900 -> boldface.
    FItalic;
      TrueType font set to Italic. 0 -> FALSE, 1 -> TRUE.
    FUnline;
      TrueType font set to underlined. 0 -> FALSE, 1 -> TRUE.
    FStrikeOut;
      TrueType font set to strikethrough. 0 -> FALSE, 1 -> TRUE.
    id_name;
      Provides a name to be stored in the printer for identification purposes; 
      can be call out graphic directly via the Z_Load_Graphic() function.
    data;
      Text content.
      For Z_Prn_Text_TrueType_Uni() and Z_Prn_Text_TrueType_UniB(), the encoding 
      of input data string should be in UTF-8, UTF-16, or in Unicode big endian format; 
      the string must be terminated with 0.
    format;
      Encoding scheme used to decode Unicode data.
      0 -> Determined by the BOM (byte order mark) in the string header.
      1 -> UTF-16.
      2 -> Unicode big endian.
      3 -> UTF-8.
    mem;
      Storage location of graphics. 0 -> RAM 1 -> Flash Memory.
      Note: Flash memory has a limited lifetime. It is recommended that data be 
      stored in RAM unless it will be reused.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    char *pbuf = new char[128];
    Z_Prn_Text_TrueType(30, 100, 30, "Arial", 1, 400, 0, 0, 0, "AA", "TrueType Font", 0);
      //save in printer.
    Z_Prn_Text_TrueType_W(30, 160, 20, 20, "Times New Roman", 1, 400, 0, 0, 0, "AB", 
      "TT_W: hr", 0);
    Z_Prn_Text_TrueType_Uni(30, 220, 30, "Times New Roman", 1, 400, 0, 0, 0, "AC",
      L"TT_Uni: hr", 1, 0);//UTF-16
    strcpy(pbuf, "\xFF\xFE");//UTF-16.
    memcpy(&pbuf[2], (char *)L"TT_UniB: hr", 15*2);//copy mutil byte.
    Z_Prn_Text_TrueType_UniB(30, 280, 30, "Times New Roman", 1, 400, 0, 0, 0, "AD", 
      pbuf, 0, 0);//Byte Order Mark.
  VB: VBA:
    Dim buff1(128) As Byte
    Dim buff2() As Byte
    Dim i As Long
    Call Z_Prn_Text_TrueType(30, 100, 30, "Arial", 1, 400, 0, 0, 0, "AA", _
      "TrueType Font", 0) 'save in printer.
    Call Z_Prn_Text_TrueType_W(30, 160, 20, 20, "Times New Roman", 1, 400, 0, 0, 0, _
      "AB", "TT_W: hr", 0)
    buff2 = StrConv("TT_Uni: hr", vbNarrow) 
      'Converts UNICODE(wide characters) to single-byte characters.
    For i = LBound(buff2) To UBound(buff2)
        buff1(i) = buff2(i)
    Next i
    buff1(26) = 0 'null.
    buff1(27) = 0
    Call Z_Prn_Text_TrueType_Uni(30, 220, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AC", buff1(0), 1, 0) 'UTF-16
    buff1(0) = 255 'UTF-16.
    buff1(1) = 254
    buff2 = StrConv("TT_UniB: hr", vbNarrow) 
      'Converts UNICODE(wide characters) to single-byte characters.
    For i = LBound(buff2) To UBound(buff2)
        buff1(i + 2) = buff2(i)
    Next i
    buff1(30) = 0 'null.
    buff1(31) = 0
    Call Z_Prn_Text_TrueType_UniB(30, 280, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AD", buff1(0), 0, 0) 'Byte Order Mark.
  VB.net:
    Dim pbuf(128) As Byte
    Dim encUnicode = System.Text.Encoding.Unicode
    Call Z_Prn_Text_TrueType(30, 100, 30, "Arial", 1, 400, 0, 0, 0, "AA", _
      "TrueType Font", 0) 'save in printer.
    Call Z_Prn_Text_TrueType_W(30, 160, 20, 20, "Times New Roman", 1, 400, 0, 0, 0, _
      "AB", "TT_W: hr", 0)
    Call Z_Prn_Text_TrueType_Uni(30, 220, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AC", encUnicode.GetBytes("TT_Uni: hr"), 1, 0) 'UTF-16
    pbuf(0) = 255 'UTF-16.
    pbuf(1) = 254
    encUnicode.GetBytes("TT_UniB: hr", 0, 14, pbuf, 2) 'copy mutil byte.
    pbuf(30) = 0 'null.
    pbuf(31) = 0
    Call Z_Prn_Text_TrueType_UniB(30, 280, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AD", pbuf, 0, 0) 'Byte Order Mark.

REMARK  The Z_Prn_Text_TrueType function prints a line of text in TrueType font.

*******************************************************************************
Z_Clear_Memory()
===============================================================================
Function:  Clear data stored in printer RAM Memory.

Syntax:
  VC:
    void Z_Clear_Memory(void);
  VB: VBA: VB.net:
    Declare Sub Z_Clear_Memory()

Example:
  VC:
    Z_Clear_Memory();
  VB: VBA: VB.net:
    Call Z_Clear_Memory()

REMARK  This function will erase all graphics and soft fonts stored in printer RAM  
    Memory due to graphics and soft fonts will accumulate in memory that will 
    cause printer memory overflow. The function should be sent to printer before 
    function Print_Out(). While printer memory is full, the previous loaded graphics and 
    soft fonts will be erased from RAM Memory. To avoid improper deletion, 
    the function should be sent to printer before function Z_Print_Out().

*******************************************************************************
Z_Clear_MemoryEx()
===============================================================================
Function:  Clear data stored in printer RAM or Flash Memory.

Syntax:
  VC:
    void Z_Clear_MemoryEx(int nMode);
  VB: VBA:
    Declare Sub Z_Clear_MemoryEx(ByVal nMode As Long)
  VB.net:
    Declare Sub Z_Clear_MemoryEx(ByVal nMode As Integer)

PARAMETER
    nMode;
      0 --> RAM
      1 --> Flash

Example:
  VC:
    Z_Clear_MemoryEx(0);
  VB: VBA: VB.net:
    Call Z_Clear_MemoryEx(0)

REMARK  This function will erase all graphics and soft fonts stored in printer RAM or 
    Flash Memory due to graphics and soft fonts will accumulate in memory that will 
    cause printer memory overflow. The function should be sent to printer before 
    function Print_Out(). While printer memory is full, the previous loaded graphics and 
    soft fonts will be erased from RAM or Flash Memory. To avoid improper deletion, 
    the function should be sent to printer before function Z_Print_Out().

*******************************************************************************
Z_Set_Backfeed()
===============================================================================
Function:  Set tear off position.

Syntax:
  VC:
    void Z_Set_Backfeed(int nDistance);
  VB: VBA:
    Declare Function Z_Set_Backfeed(ByVal nDistance As Long) As Long
  VB.net:
    Declare Function Z_Set_Backfeed(ByVal nDistance As Integer) As Integer

Parameter:
    nDistance;
      set the tear off distance, range: 0~999, unit: dot.

Example:
  VC:
    Z_Set_Backfeed(204);
  VB: VBA: VB.net:
    Call Z_Set_Backfeed(204)

REMARK  Above function example will enable back feed with a distance of 204 dots.

*******************************************************************************
Z_Set_Darkness()
===============================================================================
Function:  Set printing darkness.

Syntax:
  VC:
    int Z_Set_Darkness(int darkness);
  VB: VBA:
    Declare Function Z_Set_Darkness(ByVal darkness As Long) As Long
  VB.net:
    Declare Function Z_Set_Darkness(ByVal darkness As Integer) As Integer

Parameter:
    darkness;
      set printing darkness, range:-30~30(default: 0).

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Darkness(12);
  VB: VBA: VB.net:
    Call Z_Set_Darkness(12)

REMARK  This function is to control the printing darkness, to obtain better
    printing quality, other factors such as label material, ribbon
    types, and the image pattern itself should be considered as well.

*******************************************************************************
Z_Set_DebugDialog()
===============================================================================
Function:  Set debug environment and warning dialog.

Syntax:
  VC:
    int Z_Set_DebugDialog(int nEnable);
  VB: VBA:
    Declare Function Z_Set_DebugDialog(ByVal nEnable As Long) As Long
  VB.net:
    Declare Function Z_Set_DebugDialog(ByVal nEnable As Integer) As Integer

Parameter:
    nEnable;
      1 -> enable debug environment.
      0 -> disable debug environment.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_DebugDialog(1);
  VB: VBA: VB.net:
    Call Z_Set_DebugDialog(1)

REMARK  This function will set a debug environment for a program, except
    returning relevant error code, it will also show a warning dialog.

*******************************************************************************
Z_Set_Label()
===============================================================================
Function:  Set label length, it is be must when the label is continuous.

Syntax:
  VC:
    int Z_Set_Label(int Length);
  VB: VBA:
    Declare Function Z_Set_Label(ByVal Length As Long) As Long
  VB.net:
    Declare Function Z_Set_Label(ByVal Length As Integer) As Integer

Parameter:
    Length;
      continuous label length, the unit is dot.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Label(300);
  VB: VBA: VB.net:
    Call Z_Set_Label(300)

REMARK  The function will set label length.

*******************************************************************************
Z_Set_Mode()
===============================================================================
Function:  Set print mode (tear off mode, peel off mode, cutting mode).

Syntax:
  VC:
    int Z_Set_Mode(char mode);
  VB: VBA:
    Declare Function Z_Set_Mode(ByVal mode As Byte) As Long
  VB.net:
    Declare Function Z_Set_Mode(ByVal mode As Byte) As Integer

Parameter:
    mode;
      T: tear off.
      P: peel off.
      C: cutter enable.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Mode('C');
  VB: VBA: VB.net:
    Call Z_Set_Mode(Asc("C"))

REMARK  This is an important function in a program.

*******************************************************************************
Z_Set_Origin()
===============================================================================
Function:  Redefine the origin point of y-axis.

Syntax:
  VC:
    int Z_Set_Origin(int y);
  VB: VBA:
    Declare Function Z_Set_Origin(ByVal y As Long) As Long
  VB.net:
    Declare Function Z_Set_Origin(ByVal y As Integer) As Integer

Parameter:
    y;
      new origin point of y-axis.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Origin(10);
  VB: VBA: VB.net:
    Call Z_Set_Origin(10)

REMARK  The Z_Set_Origin function set the origin point y-axis.

*******************************************************************************
Z_Set_Paper()
===============================================================================
Function:  Set label type as continuous media or non-continuous media.

Syntax:
  VC:
    int Z_Set_Paper(char mode);
  VB: VBA:
    Declare Function Z_Set_Paper(ByVal mode As Byte) As Long
  VB.net:
    Declare Function Z_Set_Paper(ByVal mode As Byte) As Integer

Parameter:
    mode;
      N: continuous media, Y: non-continuous media.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Paper('Y');
  VB: VBA: VB.net:
    Call Z_Set_Paper(Asc("Y"))
    
REMARK  The Z_Set_Paper function set label label type as continuous media 
    or non-continuous media.

*******************************************************************************
Z_Set_Prncomport()
===============================================================================
Function:  Set printer serial communications.

Syntax:
  VC:
    int Z_Set_Prncomport(int baud, int parity, int data, int stop);
  VB: VBA:
    Declare Function Z_Set_Prncomport(ByVal baud As Long, ByVal parity As Long, _
      ByVal data As Long, ByVal stop As Long) As Long
  VB.net:
    Declare Function Z_Set_Prncomport(ByVal baud As Integer, ByVal parity As Integer, _
      ByVal data As Integer, ByVal stop As Integer) As Integer

Parameters:
    baud;
      accepted values: 
      2400  -> 2400 baud.
      4800  -> 4800 baud.
      9600  -> 9600 baud.
      19200 -> 19200 baud.
      38400 -> 38400 baud.
    parity;
      parity.
      0: none parity;
      1: even parity;
      2: odd parity
    data;
      data bit (7 or 8).
    stop;
      stop bit (1 or 2).

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Prncomport(9600, 0, 8, 1);
  VB: VBA: VB.net:
    Call Z_Set_Prncomport(9600, 0, 8, 1)

REMARK  Printer and PC must have the same serial communication settings.

*******************************************************************************
Z_Set_Prncomport_PC()
===============================================================================
Function:  Set PC serial communications.

Syntax:
  VC:
    int Z_Set_Prncomport_PC(int nBaudRate, int nByteSize, int nParity, int nStopBits, 
      int nDsr, int nCts, int nXonXoff);
  VB: VBA:
    Declare Function Z_Set_Prncomport_PC(ByVal nBaudRate As Long, _
      ByVal nBytesSize As Long, ByVal nParity As Long, ByVal nStopBits As Long, _
      ByVal nDsr As Long, ByVal nCts As Long, ByVal nXonXoff As Long) As Long
  VB.net:
    Declare Function Z_Set_Prncomport_PC(ByVal nBaudRate As Integer, _
      ByVal nBytesSize As Integer, ByVal nParity As Integer, ByVal nStopBits As Integer, _
      ByVal nDsr As Integer, ByVal nCts As Integer, ByVal nXonXoff As Integer) As Integer

Parameters:
    nBaudRate;
      Baud rate
      1 -> 110     9 -> 19200
      2 -> 300    10 -> 38400
      3 -> 600    11 -> 56000
      4 -> 1200   12 -> 57600
      5 -> 2400   13 -> 115200
      6 -> 4800   14 -> 128000
      7 -> 9600   15 -> 256000
      8 -> 14400   0 -> 9600
    nByteSize;
      Data bit
      0  ->  7-bit data
      7  ->  7-bit data
      8  ->  8-bit data
    nParity;
      Parity
      0  ->  none parity
      1  ->  even parity
      2  ->  odd parity
    nStopBits;
      Stop bit
      0  ->  1 stop bit
      1  ->  1 stop bit
      2  ->  2 stop bit
    nDsr;
      set hardware flow control
      1  ->  DTR control handshake
      0  ->  DTR control enable
    nCts;
      set hardware flow control
      1  ->  RTS control handshake
      0  ->  RTS control enable
    nXonXoff;
      Set software flow control
      0  ->  enable
      1  ->  disable

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Prncomport_PC(0, 0, 0, 0, 0, 0, 0);
  VB: VBA: VB.net:
    Call Z_Set_Prncomport_PC(0, 0, 0, 0, 0, 0, 0)

REMARK  Printer and PC must have the same serial communication settings.
    This function must be positioned before function Z_Print_Out().

*******************************************************************************
Z_Set_Reset()
===============================================================================
Function:  reset printer to factory default.

Syntax:
  VC:
    void Z_Set_Reset();
  VB: VBA: VB.net:
    Declare Sub Z_Set_Reset()

Example:
  VC:
    Z_Set_Reset();
  VB: VBA: VB.net:
    Call Z_Set_Reset()

REMARK  After call Z_Set_Reset function, the printer will reset printer to 
    factory default.

*******************************************************************************
Z_Set_Speed()
===============================================================================
Function:  Set printing speed.

Syntax:
  VC:
    int Z_Set_Speed(int s);
  VB: VBA:
    Declare Function Z_Set_Speed(ByVal s As Long) As Long
  VB.net:
    Declare Function Z_Set_Speed(ByVal s As Integer) As Integer

Parameter:
    s;
      print speed. Value: 1~6 (IPS)

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Speed(3);
  VB: VBA: VB.net:
    Call Z_Set_Speed(3)

REMARK  The Z_Set_Speed function set the printing speed.

*******************************************************************************
Z_Set_TPH()
===============================================================================
Function:  Set media type (thermal transfer media or direct thermal media).

Syntax:
  VC:
    int Z_Set_TPH(char m);
  VB: VBA:
    Declare Function Z_Set_TPH(ByVal m As Byte) As Long
  VB.net:
    Declare Function Z_Set_TPH(ByVal m As Byte) As Integer

Parameter:
    m;
      T: thermal transfer media.
      D: direct thermal media.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_TPH('T');
  VB: VBA: VB.net:
    Call Z_Set_TPH(Asc("T"))

REMARK  # Above function will set media type as thermal transfer mode.
      # This function is the same as setting printing in thermal transfer
        mode or direct thermal mode.
      # This is an important function in a program.

*******************************************************************************
Z_Set_Unit()
===============================================================================
Function:  Set units of measurement (inch, mm, dots).

Syntax:
  VC:
    int Z_Set_Unit(char m);
  VB: VBA:
    Declare Function Z_Set_Unit(ByVal m As Byte) As Long
  VB.net:
    Declare Function Z_Set_Unit(ByVal m As Byte) As Integer

Parameters:
    m;
      D: dots.
      I: inches.
      M: millimeters.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Unit('D');
  VB: VBA: VB.net:
    Call Z_Set_Unit(Asc("D"))

REMARK  The Z_Set_Unit function can changed unit of measurement is inch, mm or dots.

*******************************************************************************
Z_Set_Gap()
===============================================================================
Function:  set label gap length.

Syntax:
  VC:
    int Z_Set_Gap(int nPattern, int gapLen);
  VB: VBA:
    Declare Function Z_Set_Gap(ByVal nPatern As Long, ByVal gapLen As Long) As Long
  VB.net:
    Declare Function Z_Set_Gap(ByVal nPatern As Integer, _
      ByVal gapLen As Integer) As Integer

Parameters:
    nPattern;
      0~65535 (mm).
    gapLen;
      5~65535 (mm).

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Gap(30, 20);
  VB: VBA: VB.net:
    Call Z_Set_Gap(30, 20)

REMARK  This function is used only when label gap length is over 5mm, and
    the function should be positioned before function Z_Set_Label().

*******************************************************************************
Z_Set_ProcessDlg()
===============================================================================
Function:  Enable or disable printing task transmission process bar.

Syntax:
  VC:
    int Z_Set_ProcessDlg(int nShow);
  VB: VBA:
    Declare Function Z_Set_ProcessDlg(ByVal nShow As Long) As Long
  VB.net:
    Declare Function Z_Set_ProcessDlg(ByVal nShow As Integer) As Integer

Parameters:
    nShow;
      0 -> disable;
      1 -> enable.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_ProcessDlg(1);
  VB: VBA: VB.net:
    Call Z_Set_ProcessDlg(1)

REMARK  The Z_Set_ProcessDlg function can enable/disable dialog message.

*******************************************************************************
Z_Set_ErrorDlg()
===============================================================================
Function:  Enable or disable retry inquiry dialog when transmitting fail.

Syntax:
  VC:
    int Z_Set_ErrorDlg(int nShow);
  VB: VBA:
    Declare Function Z_Set_ErrorDlg(ByVal nShow As Long) As Long
  VB.net:
    Declare Function Z_Set_ErrorDlg(ByVal nShow As Integer) As Integer

Parameters:
    nShow;
      0 -> disable;
      1 -> enable.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_ErrorDlg(1);
  VB: VBA: VB.net:
    Call Z_Set_ErrorDlg(1)

REMARK  The Z_Set_ErrorDlg function can enable/disable retry inquiry dialog when transmitting fail.

*******************************************************************************
Z_Bar2d_QRCode()
===============================================================================
Function:  print QR code.

Syntax:
  VC:
    int Z_Bar2d_QRCode(int x, int y, int nModel, int nMagni, int nErr_Cor, int nInput, 
      LPCTSTR data, int increase);
  VB: VBA:
    Declare Function Z_Bar2d_QRCode(ByVal x As Long, ByVal y As Long, _
    ByVal nModel As Long, ByVal nMagni As Long, ByVal nErr_Cor As Long, _
      ByVal nInput As Long, ByVal data As String, ByVal increase As Long) As Long
  VB.net:
    Declare Function Z_Bar2d_QRCode(ByVal x As Integer, ByVal y As Integer, _
      ByVal nModel As Integer, ByVal nMagni As Integer, ByVal nErr_Cor As Integer, _
      ByVal nInput As Integer, ByVal data As String, ByVal increase As Integer) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis.
    nModel;
      accepted values:
      1  ->  original;
      2  ->  enhanced
    nMagni;
      magnification factors
      1  ->  on 150 dpi printers
      2  ->  on 200 dpi printers
      3  ->  on 300 dpi printers
      4  ->  through 10
    nErr_Cor;
      error correction level
      1  ->  ultra-high reliability level
      2  ->  high reliability level
      3  ->  standard (default)
      4  ->  high density level
    nInput;
      1  ->  automatic
      2  ->  manual
    data;
      barcode data.
    increase;
      increment of number.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Bar2d_QRCode(20, 20, 2, 2, 3, 1, "QR Code", 0);
  VB: VBA: VB.net:
    Call Z_Bar2d_QRCode(20, 20, 2, 2, 3, 1, "QR Code", 0)

REMARK  The Z_Bar2d_QRCode function can print a 2D Barcod QR Code.

*******************************************************************************
Z_Set_PrintWidth()
===============================================================================
Function:  Set print width.

Syntax:
  VC:
    int Z_Set_PrintWidth(int nDotWidth);
  VB: VBA:
    Declare Function Z_Set_PrintWidth(ByVal nDotWidth As Long) As Long
  VB.net:
    Declare Function Z_Set_PrintWidth(ByVal nDotWidth As Integer) As Integer

Parameter:
    nDotWidth;
      print width in dots.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_PrintWidth(406);
  VB: VBA: VB.net:
    Call Z_Set_PrintWidth(406)

REMARK  The Z_Set_PrintWidth function can set print range.

*******************************************************************************
Z_Print_OutQuality()
===============================================================================
Function:  Print with quantity.

Syntax:
  VC:
    int Z_Print_OutQuality(int nTotal, int sets, int copies, int nPause);
  VB: VBA:
    Declare Function Z_Print_OutQuality(ByVal nTotal As Long, ByVal sets As Long, _
      ByVal copies As Long, ByVal nPause As Long) As Long
  VB.net:
    Declare Function Z_Print_OutQuality(ByVal nTotal As Integer, ByVal sets As Integer, _
      ByVal copies As Integer, ByVal nPause As Integer) As Integer

Parameter:
    nTotal;
      total quantity of labels to print.
    sets;
      pause and cut value(labels between pauses).
    copies;
      replicates of each serial number.
    nPause;
      override pause per sets count.
      1 -> Yes, 0 -> No.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Print_OutQuality(1, 1, 1, 1);
  VB: VBA: VB.net:
    Call Z_Print_OutQuality(1, 1, 1, 1)

REMARK  The function Z_Print_OutQuality will send the printing task to
    printer. The function must be positioned after all other functions
    but precedes function Z_ClosePrn().

*******************************************************************************
Z_Set_Mirror()
===============================================================================
Function:  Open or close reverse printing.

Syntax:
  VC:
    int Z_Set_Mirror(char d);
  VB: VBA:
    Declare Function Z_Set_Mirror (ByVal d As Byte) As Long
  VB.net:
    Declare Function Z_Set_Mirror (ByVal d As Byte) As Integer

Parameter:
    d;
      N -> normal printing, Y -> reverse printing.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_Mirror('Y');
  VB: VBA: VB.net:
    Call Z_Set_Mirror(Asc("Y"))

REMARK  The function is used to open or close reverse printing. No matter where
    it is called in programs, whole the patterns, including text, barcodes, 
    or pictures, will be printed normally or reversely by its setting. 
    If this function is called repeatedly, the last one will decide the printing mode.

*******************************************************************************
Z_Bar2d_RSS()
===============================================================================
Function:  Print RSS code.

Syntax:
  VC:
    int Z_Bar2d_RSS(int x, int y, char ori, int rtype, int mag, int height, int seg, 
      LPCTSTR data1, LPCTSTR data2);
  VB: VBA:
    Declare Function Z_Bar2d_RSS(ByVal x As Long, ByVal y As Long, ByVal ori As Byte, _
      ByVal rtype As Long, ByVal mag As Long, ByVal height As Long, ByVal seg As Long, _
      ByVal data1 As String, ByVal data2 As String) As Long
  VB.net:
    Declare Function Z_Bar2d_RSS(ByVal x As Integer, ByVal y As Integer, _
      ByVal ori As Byte, ByVal rtype As Integer, ByVal mag As Integer, _
      ByVal height As Integer, ByVal seg As Integer, ByVal data1 As String, _
      ByVal data2 As String) As Integer

Parameters:
    x;
      X coordinate.
    y;
      Y coordinate.
    ori;
      Orientation or print direction.
      B: landscape
      R: reverse landscape
      N: Portrait
      I: reverse portrait              
    rtype;
      RSS type.
      1 -> RSS-14 
      2 -> RSS Truncated
      3 -> RSS Stacked
      4 -> RSS Stacked Omnidirectional
      5 -> RSS Limited
      6 -> RSS Expanded     
      (Default value: 1)      
    mag;
      Magnification factor. Value=1~10 (Default value: 1) 
    height;
      Barcode height.
      The standard minimum height multiplier(default value):
      RSS-14                      -> 33 pixels                 
      RSS Stacked                 -> 13 pixels
      RSS Truncated               -> 13 pixels
      RSS Stacked Omnidirectional -> 69 pixels
      RSS Limited                 -> 10 pixels
      RSS Expanded                -> 34 pixels    
    seg;
      Segments per row. Only work in RSS Expanded. 
      Values: 2~22(even only); Default value: 22.
    data1;
      Numeric data.
    data2;
      2D data.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Bar2d_RSS(100, 100, 'R', 6, 1, 34, 4, "1234567890", "RSS code");
  VB: VBA: VB.net:
    Call Z_Bar2d_RSS(100, 100, Asc("R"), 6, 1, 34, 4, "123456789012", "RSS code")

REMARK  This Z_Bar2d_RSS function is used to print RSS barcode.

*******************************************************************************
Z_Set_EncryptionKey()
===============================================================================
Function: Set the encryption key.

Syntax:
  VC:
    int Z_Set_EncryptionKey(char encryptionKey[16]);
  VB: VBA:
    Declare Function Z_Set_EncryptionKey(ByVal encryptionKey As String) As Long
  VB.net:
    Declare Function Z_Set_EncryptionKey(ByVal encryptionKey As String) As Integer

Parameters:
    encryptionKey;
      The encryption key, the key needs 16 chars and the range from 0x21 to 0x7E.

RETURN:
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Set_EncryptionKey("key-123456789000");
  VB: VBA: VB.net:
    Call Z_Set_EncryptionKey("key-123456789000")

REMARK  This function is used to set the encryption key value, and send data immediate, 
    and store in printer.

*******************************************************************************
Z_Check_EncryptionKey()
===============================================================================
FunctionG  Check the encryption key correctness.

SyntaxG
  VC:
    int Z_Check_EncryptionKey(char decodeKey[8], char encryptionKey[16], DWORD dwTimeoutms);
  VB: VBA:
    Declare Function Z_Check_EncryptionKey(ByVal decodeKey As String, ByVal encryptionKey As String, _
      ByVal dwTimeoutms As Long) As Long
  VB.net:
    Declare Function Z_Check_EncryptionKey(ByVal decodeKey As String, ByVal encryptionKey As String, _
      ByVal dwTimeoutms As ULong) As Integer

ParametersG
    decodeKey;
      The decode key, the key needs 8 chars and the range from 0x21 to 0x7E.
    encryptionKey;
      The encryption key, the key needs 16 chars and the range from 0x21 to 0x7E.
    dwTimeoutms;
      This is timeout time. The max times to receive data, unit is ms.

RETURNG
    0 -> OK.
    Reference ZW-Error.txt file.

ExampleG
  VC:
    int ret;
    ret = Z_Check_EncryptionKey("test-par", "key-123456789000", 1000);//1 second.
  VB: VBA:
    Dim ret As Long
    ret = Z_Check_EncryptionKey("test-par", "key-123456789000", 1000)   '1 second.
  VB.net:
    Dim ret As Integer
    ret = Z_Check_EncryptionKey("test-par", "key-123456789000", 1000)   '1 second.

REMARK  This function is used to check the encryption key correctness. After send 
    the decodeKey string to printer, and calculate with the encryption key in printer 
    then return the result. Then to compare with that calculate with the decodeKey and 
    encryptionKey string is the same.

*******************************************************************************
Z_Bar2d_DataMatrix()
===============================================================================
Function:  Print Data Matrix code.

Syntax:
  VC:
    int Z_Bar2d_DataMatrix(int x, int y, int o, int h, int c, int r, LPCTSTR data, int increase);
  VB: VBA:
    Declare Function Z_Bar2d_DataMatrix(ByVal x As Long, ByVal y As Long, ByVal o As Long, _
      ByVal h As Long, ByVal c As Long, ByVal r As Long, ByVal data As String, _
      ByVal increase As Long) As Long
  VB: VBA:
    Declare Function Z_Bar2d_DataMatrix(ByVal x As Integer, ByVal y As Integer, _
      ByVal o As Integer, ByVal h As Integer, ByVal c As Integer, ByVal r As Integer, _
      ByVal data As String, ByVal increase As Integer) As Integer

Parameters:
    x;
      x-axis.
    y;
      y-axis.
    o;
      printing orientation, 1=0X, 2=90X, 3=180X, 4=270X
    h;
      barcode height(range: 1~9999 pixel).
    c;
      column count(range: 9~49, must be even value; 0 is auto).
    r;
      row count(range: 9~49, must be even value; 0 is auto).
    data;
      data string.
    increase;
      increment, default=0.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

Example:
  VC:
    Z_Bar2d_DataMatrix(50, 50, 1, 10, 0, 0, "DataMatrix", 0);
  VB: VBA: VB.net:
    Call Z_Bar2d_DataMatrix(50, 50, 1, 10, 0, 0, "DataMatrix", 0)

REMARK  Above function will print a Data Matrix code.

*******************************************************************************
Z_Set_CommTimeout()
===============================================================================
PURPOSE   Set communication time.

SYNTAX
  VC:
    void Z_Set_CommTimeout(int ReadTotalTimeoutConstant, int WriteTotalTimeoutConstant);
  VB: VBA:
    Declare Sub Z_Set_CommTimeout(ByVal ReadTotalTimeoutConstant As Long, _
      ByVal WriteTotalTimeoutConstant As Long)
  VB.net:
    Declare Sub Z_Set_CommTimeout(ByVal ReadTotalTimeoutConstant As Integer, _
      ByVal WriteTotalTimeoutConstant As Integer)

PARAMETER
    ReadTotalTimeoutConstant;
      read timeout; unit : 1 ms. -1 is infinite.
    WriteTotalTimeoutConstant;
      write timeout; unit : 1 ms. -1 is infinite.

EXAMPLE
  VC:
    Z_Set_CommTimeout(0, -1);
    Z_CreatePrn(11, NULL); //USB
  VB: VBA: VB.net:
    Call Z_Set_CommTimeout(0, -1)
    Call Z_CreatePrn(11, null) 'USB

REMARK  The fuction of Z_Set_CommTimeout is to setting read/write timeout. 
    If you want to use this command, this command should be set before Z_CreatePrn() executed.

*******************************************************************************
Z_Get_CommTimeout()
===============================================================================
PURPOSE   Get communication time.

SYNTAX
  VC:
    void Z_Get_CommTimeout(int *ReadTotalTimeoutConstant, int *WriteTotalTimeoutConstant);
  VB: VBA:
    Declare Sub Z_Get_CommTimeout(ByRef ReadTotalTimeoutConstant As Long, _
      ByRef WriteTotalTimeoutConstant As Long)
  VB.net:
    Declare Sub Z_Get_CommTimeout(ByRef ReadTotalTimeoutConstant As Integer, _
      ByRef WriteTotalTimeoutConstant As Integer)

PARAMETER
    ReadTotalTimeoutConstant;
      read timeout; unit : 1 ms. -1 is infinite.
    WriteTotalTimeoutConstant;
      write timeout; unit : 1 ms. -1 is infinite.

EXAMPLE
  VC:
    int ReadTotalTimeoutConstant, WriteTotalTimeoutConstant;
    Z_Get_CommTimeout(&ReadTotalTimeoutConstant, &WriteTotalTimeoutConstant);
  VB: VBA: VB.net:
    Dim ReadTotalTimeoutConstant, WriteTotalTimeoutConstant As Long
    Call Z_Get_CommTimeout(ReadTotalTimeoutConstant, WriteTotalTimeoutConstant)

*******************************************************************************
Z_Set_LabelForSmartPrint()
===============================================================================
PURPOSE   Set the information needed for Smart Print.

SYNTAX
  VC:
    int Z_Set_LabelForSmartPrint(int lablength, int gaplength);
  VB: VBA:
    Declare Function Z_Set_LabelForSmartPrint(ByVal lablength As Long, _
      ByVal gaplength As Long) As Long
  VB.net:
    Declare Function Z_Set_LabelForSmartPrint(ByVal lablength As Integer, _
      ByVal gaplength As Integer) As Integer
      
PARAMETER
    lablength;
      Label length. Unit : 0.1 mm.
    gaplength;
      Gap length. Unit : 0.1 mm.

RETURN
    0 -> OK.
    Reference ZW-Error.txt file.

EXAMPLE
  VC:
    Z_Set_LabelForSmartPrint(762, 30);
  VB: VBA: VB.net:
    Call Z_Set_LabelForSmartPrint(762, 30)

REMARK  This Z_Set_LabelForSmartPrint function is used to set 
    the label length and GAP length information required for Smart Print.